package com.lifeng.service;

import com.lifeng.bean.User;
import com.lifeng.mapper.UserMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by lifeng on 2019/8/9.
 */
@Service
public class UserService {
    @Resource
    private UserMapper userMapper;

    /** 通过用户名查询*/
    public User selectByUserName(String userName){
        return userMapper.selectByUserName(userName);
    }

    /** 通过用户名查询权限*/
    public List<String> selectPermissionByUserId(Integer userId){
        return userMapper.selectPermissionByUserId(userId);
    }
}
